package com.mall.serviceImpl;

import com.mall.bean.SystemRolePermission;
import com.mall.mapper.SystemRolePermissionMapper;
import com.mall.service.SystemRolePermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @PageName com.mall.serviceImpl
 * @Description 角色权限中间表
 * @Author 何全裕
 * @Create 2017-09-07 21:53
 * @Version 1.0
 **/
@Service("RolePermission")
public class SystemRolePermissionServiceImpl implements SystemRolePermissionService {

    @Autowired
    private SystemRolePermissionMapper systemRolePermissionMapper;

    public List<SystemRolePermission> getSystemRolePermission(String role_id) {
        return systemRolePermissionMapper.getSystemRolePermission(role_id);
    }

    public void deleteRolePermissionByRoleId(String role_id) {
        systemRolePermissionMapper.deleteRolePermissionByRoleId(role_id);
    }

    public void insertRolePermission(SystemRolePermission rolePermission) {
        systemRolePermissionMapper.insertRolePermission(rolePermission);
    }

    public void deleteByPermissionId(String permission_id) {
        systemRolePermissionMapper.deleteByPermissionId(permission_id);
    }


}
